<template>
	<div>
		<button @click="getStudentInfo">点我发请求，获取学生列表</button>
		<button @click="getCartInfo">点我发请求，获取汽车列表</button>
	</div>
</template>

<script>
	import axios from 'axios'

	export default {
		name:'App',
		methods: {
			async getStudentInfo(){
				const result = await axios.get('http://localhost:8080/api1/students')
				console.log(result.data)
			},
			async getCartInfo(){
				const result = await axios.get('http://localhost:8080/api2/cars')
				console.log(result.data)
			}
		},
	}
</script>